package com.yanqu.road.server.cmd.chefduel.process2.cross;

import com.yanqu.road.logic.pb.CrossActivityPb;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.chefduel.ChefDuelProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.activity.chefduel.OtherActivityChefDuelActivityMgr;
import com.yanqu.road.server.protocol.Protocol;
import io.netty.channel.ChannelHandlerContext;

@Cmd(code = Protocol.S_CROSS_CHEF_DUEL2_ACTIVITY_SYNC, desc = "活动信息同步")
public class CrossChefDuel2ActivityInfoSyncCmd implements Command {

    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage yanQuMessage) throws Exception {

        ChefDuelProto.CrossChefDuel2ActivityInfoSync sync = ChefDuelProto.CrossChefDuel2ActivityInfoSync.parseFrom(yanQuMessage.getBytes());

        OtherActivityChefDuelActivityMgr.syncActivityInfo(CrossActivityPb.parseActivityTempMsg(sync.getActivity()));

    }
}
